{% extends 'index.html' %}

{% block title %}
<title>下架图书列表</title>
{% endblock %}

{% block con %}
<div class="row-content am-cf">
    <div class="row">
        <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
            <div class="widget am-cf">
                <div class="widget-head am-cf">
                    <div class="widget-title  am-cf">下架图书列表</div>


                </div>
                <div class="widget-body  am-fr">

                    <div class="am-u-sm-12 am-u-md-6 am-u-lg-6">
                        <div class="am-form-group">
                            <div class="am-btn-toolbar">
                                <div class="am-btn-group am-btn-group-xs">
                                    <a  href="{{ url_for('admin.book_add') }}" class="am-btn am-btn-default am-btn-success"><span class="am-icon-plus"></span> 新增</a>
                                </div>
                            </div>
                        </div>
                    </div>
                <form>
                    <div class="am-u-sm-12 am-u-md-6 am-u-lg-3">
                        <div class="am-form-group tpl-table-list-select">
                            <select name='types' data-am-selected="{btnSize: 'sm'}" style="display: none;">
                              <option value="all">所有类别</option>

                            </select>
                        </div>
                    </div>

                    <div class="am-u-sm-12 am-u-md-12 am-u-lg-3">
                        <div class="am-input-group am-input-group-sm tpl-form-border-form cl-p">
                            <input value="{{ request.args.keywords}}" name="keywords" type="text" class="am-form-field ">
                            <span class="am-input-group-btn">
                                <button class="am-btn  am-btn-default am-btn-success tpl-table-list-field am-icon-search" ></button>
                              </span>
                        </div>
                    </div>
                </form>

                    <div class="am-u-sm-12">
                        <table width="100%" class="am-table am-table-compact am-table-striped tpl-table-black ">
                            <thead>
                                <tr>
                                    <th>ID</th>
                                    <th>文章缩略图</th>
                                    <th>文章标题</th>
                                    <th>作者</th>
                                    <th>时间</th>
                                    <th>操作</th>
                                </tr>
                            </thead>
                            <tbody>
                                {% for b in books %}
                                <tr class="gradeX"> 
                                    <td class="am-text-middle">{{ b.id }}</td>
                                    <td class="am-text-middle">
                                        <img src="{{ b.image }}" class="tpl-table-line-img" alt="">
                                    </td>
                                    <td class="am-text-middle">{{ b.title }}</td>
                                    <td class="am-text-middle">{{ b.author }}</td>
                                    <td class="am-text-middle">{{ b.addtime }}</td>
                                    <td class="am-text-middle">
                                        <div class="tpl-table-black-operation">
                                            <a href="{{ url_for('admin.book_open') }}?bid={{ b.id }}" class="tpl-table-black-operation-del">
                                                <i class="am-icon-trash"></i> 还原
                                            </a>
                                        </div>
                                    </td>
                                </tr>
                                {% endfor %}
                                <!-- more data -->
                            </tbody>
                        </table>
                    </div>
                    <div class="am-u-lg-12 am-cf">

                        <div class="am-fr">
                            {% import "_macros.html" as macros %} 
                            
                            {%if pagination%}
                                <div class="pagination">
                                    {{ macros.pagination_widget(pagination, '.book_list') }}
                                </div>
                            {% endif %}
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %}

